<?php

namespace app\common\model;

use think\Model;
use think\Validate;
use think\Db;

class MerchantBillModel extends Model
{
    protected $table = 'zj_merchant_bill';

    public function search($search)
    {
        $query = MerchantBillModel::where('merchant_id',$search['merchant_id'])
                ->where('delete_time',0);
        if (isset($search['time']) && $search['time']) {
            $query->where(['create_time' => ['between',[$search['start_time'],$search['end_time']]]]);
        }
        $data = $query->paginate(10,false,['query' => request()->param()]);
        return $data;
    }
}

  





 
